projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a78a167
)
Simplify code in 'string_from_display_spec'
author
Chris Gregory
<czipperz@gmail.com>
Sat, 31 Dec 2016 11:18:57 +0000
(13:18 +0200)
committer
Eli Zaretskii
<eliz@gnu.org>
Sat, 31 Dec 2016 11:18:57 +0000
(13:18 +0200)
* src/xdisp.c (string_from_display_spec): Eliminate a redundant
test before the loop.
Copyright-paperwork-exempt: yes
src/xdisp.c
patch
|
blob
|
history
diff --git
a/src/xdisp.c
b/src/xdisp.c
index 5de5ecaef0d50247b2330956d52f48b29cc3ffa4..45a04caebfdb60b5bf56053f040985159e3e13a5 100644
(file)
--- a/
src/xdisp.c
+++ b/
src/xdisp.c
@@
-1252,12
+1252,11
@@
string_from_display_spec (Lisp_Object spec)
{
if (CONSP (spec))
{
- while (CONSP (spec))
- {
- if (STRINGP (XCAR (spec)))
- return XCAR (spec);
- spec = XCDR (spec);
- }
+ do {
+ if (STRINGP (XCAR (spec)))
+ return XCAR (spec);
+ spec = XCDR (spec);
+ } while (CONSP (spec));
}
else if (VECTORP (spec))
{